/* 基础样式与主题 */
:root {
  --bg: #0d1b2a; /* 深邃科技蓝 */
  --panel: #0f172a;
  --accent: #0ea5e9; /* 霓虹蓝 */
  --accent-2: #10b981; /* 亮绿 */
  --danger: #ef4444;
  --warning: #f59e0b; /* 警示橙 */
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Microsoft YaHei", "微软雅黑", sans-serif;
}

.body-bg {
  background-image: url('PixPin_2025-11-04_15-38-20.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 布局 */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.header .title { font-size: 18px; font-weight: 600; }

/* 模块标题（侧栏菜单上方）：简洁加粗、紧凑间距 */
.sidebar .module-title {
  margin: -1px 12px 4px;
  padding: 2px 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

/* 科技特效控制按钮 */
.tech-controls { display: flex; align-items: center; gap: 12px; }
.tech-btn {
  background: rgba(53,227,255,0.1) !important;
  border: 1px solid rgba(53,227,255,0.3) !important;
  color: #35e3ff !important;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease; cursor: pointer;
  backdrop-filter: blur(8px);
}
.tech-btn:hover {
  background: rgba(53,227,255,0.2) !important;
  border-color: rgba(53,227,255,0.6) !important;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(53,227,255,0.4);
}
.tech-btn.active {
  background: rgba(53,227,255,0.3) !important;
  border-color: #35e3ff !important;
  box-shadow: 0 0 15px rgba(53,227,255,0.6);
}
.tech-icon { font-size: 16px; }
.nav {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.nav a:hover { border-color: var(--accent); color: var(--accent); }
.container { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  /* 平板尺寸下减少特效强度 */
  body.bigscreen.datav::after { opacity: 0.2; }
  .matrix-rain { font-size: 10px; }
}
@media (max-width: 800px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  /* 手机尺寸下进一步优化 */
  body.bigscreen.datav .card { transform: none; }
  body.bigscreen.datav .card:hover { transform: translateY(-4px); }
  body.bigscreen.datav::after { display: none; } /* 隐藏粒子背景提升性能 */
  .matrix-rain { display: none; } /* 隐藏数字雨 */
  body.bigscreen.datav .container::before { display: none; } /* 隐藏网格背景 */
}

.card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.card h3 { margin: 0 0 12px 0; font-size: 16px; }
.card .value { font-size: 22px; font-weight: 700; }
.card.success { border-color: rgba(16,185,129,0.4); }
.card.danger { border-color: rgba(239,68,68,0.4); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 10px; text-align: left; }
.table th { color: var(--muted); font-weight: 600; }
.table tr:hover { background: rgba(255,255,255,0.03); }
.tr-red { background: rgba(239,68,68,0.08); }
.tr-yellow { background: rgba(245,158,11,0.08); }

/* 表单与筛选 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters .field { display: flex; gap: 8px; align-items: center; }
.input, .select { background: #0b1220; border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 8px; }
.button { background: var(--accent); color: white; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.button.secondary { background: #374151; }
.button.success { background: var(--accent-2); }
.button.danger { background: var(--danger); }
.button.warning { background: var(--warning); }
.button:disabled { opacity: .6; cursor: not-allowed; }

/* 图表容器 */
.chart-box { height: 280px; }
/* 让图表卡片可伸展填满同列较高卡片 */
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-box { flex: 1; height: auto; min-height: 280px; }
/* 让Chart.js画布跟随容器大小 */
.chart-box canvas { width: 100% !important; height: 100% !important; }

/* 页签 */
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.tab.active { border-color: var(--accent); color: var(--accent); }

/* 页脚提示 */
.hint { color: var(--muted); font-size: 12px; }

/* 侧栏布局 */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 16px 12px; }
.sidebar .logo { font-weight: 700; margin-bottom: 12px; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu a { color: var(--text); text-decoration: none; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.menu a:hover { border-color: var(--accent); color: var(--accent); }
.menu a.active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }
.content { padding: 0; }

/* 报表子菜单样式 */
.submenu { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.submenu .title { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.subitem { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; margin-bottom: 8px; }
.subitem:hover { border-color: var(--accent); color: var(--accent); }
.subitem.active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }

/* 树状菜单（侧栏） */
.tree { margin-top: 12px; }
.tree-node { margin-bottom: 10px; }
.tree-header { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border:1px solid var(--border); border-radius:8px; color:var(--text); cursor:pointer; }
.tree-header:hover { border-color: var(--accent); color: var(--accent); }
.tree-header .chevron { width:0; height:0; border-top:6px solid transparent; border-bottom:6px solid transparent; border-left:6px solid var(--muted); transition: transform .2s, border-left-color .2s; }
.tree-node.expanded .chevron { transform: rotate(90deg); border-left-color: var(--accent); }
.tree-children { display:none; margin-top:8px; padding-left:8px; border-left:1px dashed var(--border); }
.tree-node.expanded .tree-children { display:block; }
.tree-link { display:block; padding:8px 10px; border:1px solid var(--border); border-radius:8px; color:var(--text); text-decoration:none; margin-bottom:8px; }
.tree-link:hover { border-color: var(--accent); color: var(--accent); }
.tree-link.active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }

/* 大屏风格覆盖（仅首页启用：body.bigscreen） */
body.bigscreen .header { padding: 18px 28px; background: linear-gradient(90deg, rgba(17,24,39,0.95), rgba(17,24,39,0.85)); border-bottom: 1px solid rgba(255,255,255,0.06); }
body.bigscreen .header .title { font-size: 20px; letter-spacing: .5px; }
body.bigscreen .container { padding: 24px 24px 28px; }
body.bigscreen .grid { gap: 20px; }
body.bigscreen .card { border-radius: 16px; box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px rgba(255,255,255,0.06); }
body.bigscreen .card h3 { font-size: 18px; }
body.bigscreen .card .value { font-size: 28px; }
body.bigscreen .chart-box { height: 360px; }
body.bigscreen .button { box-shadow: 0 6px 16px rgba(59,130,246,0.25); }
body.bigscreen .button.success { box-shadow: 0 6px 16px rgba(16,185,129,0.25); }
body.bigscreen .button:hover { filter: brightness(1.05); }
body.bigscreen .menu a { padding: 12px 14px; }

/* 背景动态渐变（Aurora 风格） */
body.bigscreen::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 500px at 15% 20%, rgba(59,130,246,0.16), transparent 60%),
    radial-gradient(700px 440px at 85% 15%, rgba(16,185,129,0.14), transparent 60%),
    radial-gradient(900px 520px at 40% 85%, rgba(245,158,11,0.12), transparent 65%),
    linear-gradient(120deg, #0f172a, #0f172a);
  background-blend-mode: screen, screen, screen, normal;
  animation: bgShift 18s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0%   { background-position: 0% 0%, 100% 0%, 0% 100%, 0 0; }
  50%  { background-position: 10% 15%, 85% 5%, 5% 85%, 0 0; }
  100% { background-position: 20% 25%, 70% 15%, 10% 80%, 0 0; }
}

/* 卡片微动画与悬浮效果 */
body.bigscreen .card { transform: translateZ(0); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
body.bigscreen .card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,0.45), inset 0 1px rgba(255,255,255,0.08); border-color: rgba(59,130,246,0.25); }
/* 悬浮通知卡片 */
.floating-card {
  position: fixed; left: 260px; right: 24px; bottom: 20px; z-index: 20;
  background: linear-gradient(180deg, rgba(17,24,39,0.85), rgba(17,24,39,0.75));
  border: 1px solid rgba(14,165,233,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  padding: 16px; border-radius: 16px; backdrop-filter: blur(6px);
}
.floating-card .countdown { font-weight: 700; color: var(--warning); }
/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; z-index: 30; }
.modal .dialog { background: #0b1220; border: 1px solid var(--border); border-radius: 12px; padding: 18px; width: 420px; box-shadow: 0 16px 32px rgba(0,0,0,.5); }
.modal .actions { display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }
/* ECharts 容器通用适配 */
.echart { width: 100%; height: 100%; }

/* ========== 科技感视觉增强效果 ========== */

/* 科技感粒子背景效果 */
body.bigscreen.datav::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(53,227,255,0.8), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(16,185,129,0.6), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(245,158,11,0.4), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(239,68,68,0.3), transparent);
  background-size: 80px 80px, 120px 120px, 160px 160px, 200px 200px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  animation: particlesFloat 30s linear infinite;
  opacity: 0.3;
  pointer-events: none; /* 确保背景不干扰交互 */
}
@keyframes particlesFloat {
  0% { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%; }
  25% { background-position: 10% 20%, 85% 15%, 15% 85%, 75% 25%; }
  50% { background-position: 20% 40%, 70% 30%, 30% 70%, 50% 50%; }
  75% { background-position: 15% 60%, 75% 45%, 45% 75%, 25% 75%; }
  100% { background-position: 0% 100%, 100% 100%, 100% 0%, 0% 0%; }
}


/* 霓虹边框呼吸效果 */
body.bigscreen.datav .card {
  animation: neonGlow 3s ease-in-out infinite alternate;
}
@keyframes neonGlow {
  0% { border-color: rgba(77,160,255,0.35); }
  50% { border-color: rgba(77,160,255,0.6); }
  100% { border-color: rgba(77,160,255,0.4); }
}

/* 数据加载故障效果 */
@keyframes glitch {
  0%, 100% { transform: translate(0); filter: hue-rotate(0deg); }
  20% { transform: translate(-1px, 1px); filter: hue-rotate(90deg); }
  40% { transform: translate(-1px, -1px); filter: hue-rotate(180deg); }
  60% { transform: translate(1px, 1px); filter: hue-rotate(270deg); }
  80% { transform: translate(1px, -1px); filter: hue-rotate(360deg); }
}
body.bigscreen.datav .card.loading .value {
  animation: glitch 0.3s ease-in-out infinite;
}

/* 3D透视悬浮效果 */
body.bigscreen.datav .card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.bigscreen.datav .card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.5),
    0 0 30px rgba(53,227,255,0.3),
    inset 0 1px rgba(255,255,255,0.1);
}

/* 脉冲指示器 */
body.bigscreen.datav .panel-title .dot {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 10px #35e3ff;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
    box-shadow: 0 0 20px #35e3ff, 0 0 30px rgba(53,227,255,0.5);
  }
}

/* 数据流光效果 */
body.bigscreen.datav .card.datav .value {
  position: relative;
  overflow: hidden;
}
body.bigscreen.datav .card.datav .value::after {
  content: "";
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(53,227,255,0.4), transparent);
  animation: dataFlow 3s ease-in-out infinite;
}
@keyframes dataFlow {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* 网格背景 */
body.bigscreen.datav .container::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(77,160,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,160,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* 边角装饰 - 仅应用于卡片 */
body.bigscreen.datav .card.datav::after {
  content: "";
  position: absolute; inset: 12px; z-index: 1;
  border: 1px solid rgba(77,160,255,0.2);
  border-radius: 8px;
  pointer-events: none;
}
body.bigscreen.datav .card.datav::before {
  content: "";
  position: absolute; inset: 8px; z-index: 0;
  border: 1px dashed rgba(77,160,255,0.1);
  border-radius: 12px;
  pointer-events: none;
}

/* 数字雨背景效果 */
@keyframes matrixRain {
  0% { transform: translateY(-100vh); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}
.matrix-rain {
  position: fixed; color: rgba(16,185,129,0.3); font-family: 'Courier New', monospace; font-size: 12px;
  animation: matrixRain linear infinite; pointer-events: none; z-index: -1;
  text-shadow: 0 0 5px rgba(16,185,129,0.5);
}
/* 骨架层：不拦截任何点击 */
#skeleton-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: 0;
}